<meta name="viewport" charset="utf-8" content="width=device-width, initial-scale=1.0">
<?php
$adminno=$_REQUEST['adminno'];//管理员号
$adminname=$_REQUEST['adminname'];//管理员名
$password=$_REQUEST['password'];//密码
$level = 'normal';
$mysqli = mysqli_connect("localhost", "root", "123456", "library");
mysqli_query($mysqli,"SET NAMES 'utf8'");
if (mysqli_connect_errno()) {
    die("Failed to connect to MySQL: (" . mysqli_connect_errno() . ") " . mysqli_connect_error());
}

//插入读者信息命令
$demand = "INSERT INTO admin values('$adminno','$adminname','$password','$level')";
$res=mysqli_query($mysqli,$demand);
if ($res) { //跳转页面
    mysqli_close($mysqli); //查询已经结束，在这里关闭连接
    echo '<script>alert("新增管理员成功");location="normalinsert_super.php";</script>';
} else {
    mysqli_close($mysqli);
    echo '<script>alert("新增管理员失败");location="normalinsert_super.php";</script>';
}